<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="en">
<head>
    <base href="${pageContext.request.contextPath}/">
    <meta charset="UTF-8">
    <title>四川工商学院失物招领系统</title>
    <%@include file="../common/commHeader.html"%>
</head>
<body style="background:#EEEEEE;">
<%@include file="header.jsp"%>
    <!--主题内容-->
    <div class="col-md-10 col-md-offset-1">
        <!--头部-->
        <div class="col-md-8 laf-detail-left laf-reg">
            <div class="col-md-9 col-md-offset-3">
            <form action="user/login" class="form-horizontal laf-register" role="form" method="post">
                <div class="input-group">
                    <span class="input-group-addon laf-loging-btn">用户名</span>
                    <input type="text" name="userName" id="userName" value="${param.userName}" class="form-control" required placeholder="请输入用户名">
                </div>
                <div class="input-group">
                    <span class="input-group-addon laf-loging-btn">密码</span>
                    <input type="password" name="password" id="password" class="form-control" required placeholder="请输入密码">
                    <c:if test="${param.logInfo == 'error'}">
                        <span class="laf-tooltiptext" style="visibility: visible;opacity: .9;"><i style="color: #F1BA2C;" class="glyphicon glyphicon-exclamation-sign"></i>密码不正确</span>
                    </c:if>
                </div>
                <div class="form-group" style="margin-left: 1%">
                    <label for="lastname" class="col-sm-2 control-label">验证码</label>
                    <div class="col-sm-3">
                        <input type="text" style="margin-left: -10%" name="code" class="form-control" pattern="\w{4}" required id="lastname" placeholder="请输入">
                    </div>
                    <div class="col-sm-3">
                        <img class="img-responsive" id="codeImage" src="laf/code" title="看不清楚？换一张" alt="验证码" style="margin-top: 3.5%;cursor: pointer">
                        <c:if test="${param.status == 'error'}">
                        <span class="laf-tooltiptext"  style="visibility: visible;opacity: .9;margin-top: -20%"><i style="color: #F1BA2C" class="glyphicon glyphicon-exclamation-sign"></i>验证码输入错误，请重新输入！</span>
                        </c:if>
                    </div>
                </div>
                <div class="form-group text-center">
                    <div class="col-sm-offset-1 col-sm-6">
                        <button type="submit" class="btn btn-default">登陆</button>
                    </div>
                </div>
            </form>
                <p class="text-right">忘记密码？<a href="laf/showFind">马上找回</a></p>
                <p class="text-right">没有账号？<a href="laf/showRegister">马上注册</a></p>
         </div>
        </div>

        <div class="col-md-3 laf-detail-right">
            <div class="laf-detail-right-top">
                <img src="image/important.jpg" width="100%" alt="">
                <ol>
                    <%@include file="leftInfo.jsp"%>
                </ol>
            </div>
        </div>

        <div class=" col-md-3 laf-detail-right-advertising">
            <img src="image/advan.jpg" width="99%" alt="">
        </div>
</div>


<script>
  $(function () {
      $('#codeImage').click(function () {
          var urlPath='laf/code?r='+new Date().getTime();
          document.getElementById("codeImage").src=urlPath;
      });
  })
</script>
</body>
</html>